package jmine.tec.persist.schema.jointable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;
import jmine.tec.persist.annotation.UniqueConstraint;
import bancosys.tec.component.Documentation;
import bancosys.tec.persist.bussobj.PersistableBusinessObject;

@Entity
@Alias("JOINED")
@Table(name = "JOINED_TABLE")
@Documentation("TABELA INHERITANCE JOINED")
@Inheritance(strategy = InheritanceType.JOINED)
@SequenceGenerator(name = "SEQ_JOINED", sequenceName = "SEQ_JOINED")
public abstract class AbstractJoinTableEntity extends PersistableBusinessObject {

    private Long id;

    private String mnemonico;

    /**
     * @return the id
     */
    @Id
    @GeneratedValue(generator = "SEQ_JOINED")
    @Column(name = "COD_JOINED", precision = 17, nullable = false)
    @Documentation("CODIGO")
    public Long getId() {
        return this.id;
    }

    /**
     * @return the mnemonico
     */
    @UniqueConstraint(name = "AK_JOINED_0")
    @Column(name = "MNE", length = 20, nullable = false)
    @Documentation("MNEMONICO")
    public String getMnemonico() {
        return this.mnemonico;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param mnemonico the mnemonico to set
     */
    public void setMnemonico(String mnemonico) {
        this.mnemonico = mnemonico;
    }
}
